Optimal. Leaf size=68 \[ \frac {1}{2} x \sqrt {a+b x} \sqrt {a c-b c x}+\frac {a^2 \sqrt {c} \tan ^{-1}\left (\frac {\sqrt {c} \sqrt {a+b x}}{\sqrt {c (a-b x)}}\right )}{b} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 68, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {38, 65, 223,
209} \begin {gather*} \frac {a^2 \sqrt {c} \text {ArcTan}\left (\frac {\sqrt {c} \sqrt {a+b x}}{\sqrt {c (a-b x)}}\right )}{b}+\frac {1}{2} x \sqrt {a+b x} \sqrt {a c-b c x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 38
Rule 65
Rule 209
Rule 223
Rubi steps
\begin {align*} \int \sqrt {a+b x} \sqrt {a c-b c x} \, dx &=\frac {1}{2} x \sqrt {a+b x} \sqrt {a c-b c x}+\frac {1}{2} \left (a^2 c\right ) \int \frac {1}{\sqrt {a+b x} \sqrt {a c-b c x}} \, dx\\ &=\frac {1}{2} x \sqrt {a+b x} \sqrt {a c-b c x}+\frac {\left (a^2 c\right ) \text {Subst}\left (\int \frac {1}{\sqrt {2 a c-c x^2}} \, dx,x,\sqrt {a+b x}\right )}{b}\\ &=\frac {1}{2} x \sqrt {a+b x} \sqrt {a c-b c x}+\frac {\left (a^2 c\right ) \text {Subst}\left (\int \frac {1}{1+c x^2} \, dx,x,\frac {\sqrt {a+b x}}{\sqrt {c (a-b x)}}\right )}{b}\\ &=\frac {1}{2} x \sqrt {a+b x} \sqrt {a c-b c x}+\frac {a^2 \sqrt {c} \tan ^{-1}\left (\frac {\sqrt {c} \sqrt {a+b x}}{\sqrt {c (a-b x)}}\right )}{b}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.08, size = 78, normalized size = 1.15 \begin {gather*} \frac {\sqrt {c (a-b x)} \left (b x \sqrt {a-b x} \sqrt {a+b x}+2 a^2 \tan ^{-1}\left (\frac {\sqrt {a+b x}}{\sqrt {a-b x}}\right )\right )}{2 b \sqrt {a-b x}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(125\) vs.
\(2(54)=108\).
time = 0.18, size = 126, normalized size = 1.85
method | result | size |
risch | \(\frac {x \left (-b x +a \right ) \sqrt {b x +a}\, c}{2 \sqrt {-c \left (b x -a \right )}}+\frac {a^{2} \arctan \left (\frac {\sqrt {b^{2} c}\, x}{\sqrt {-b^{2} c \,x^{2}+a^{2} c}}\right ) \sqrt {-\left (b x +a \right ) c \left (b x -a \right )}\, c}{2 \sqrt {b^{2} c}\, \sqrt {b x +a}\, \sqrt {-c \left (b x -a \right )}}\) | \(107\) |
default | \(-\frac {\sqrt {b x +a}\, \left (-b c x +a c \right )^{\frac {3}{2}}}{2 b c}+\frac {a \left (\frac {\sqrt {-b c x +a c}\, \sqrt {b x +a}}{b}+\frac {a c \sqrt {\left (b x +a \right ) \left (-b c x +a c \right )}\, \arctan \left (\frac {\sqrt {b^{2} c}\, x}{\sqrt {-b^{2} c \,x^{2}+a^{2} c}}\right )}{\sqrt {-b c x +a c}\, \sqrt {b x +a}\, \sqrt {b^{2} c}}\right )}{2}\) | \(126\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.52, size = 39, normalized size = 0.57 \begin {gather*} \frac {a^{2} \sqrt {c} \arcsin \left (\frac {b x}{a}\right )}{2 \, b} + \frac {1}{2} \, \sqrt {-b^{2} c x^{2} + a^{2} c} x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 1.32, size = 159, normalized size = 2.34 \begin {gather*} \left [\frac {a^{2} \sqrt {-c} \log \left (2 \, b^{2} c x^{2} + 2 \, \sqrt {-b c x + a c} \sqrt {b x + a} b \sqrt {-c} x - a^{2} c\right ) + 2 \, \sqrt {-b c x + a c} \sqrt {b x + a} b x}{4 \, b}, -\frac {a^{2} \sqrt {c} \arctan \left (\frac {\sqrt {-b c x + a c} \sqrt {b x + a} b \sqrt {c} x}{b^{2} c x^{2} - a^{2} c}\right ) - \sqrt {-b c x + a c} \sqrt {b x + a} b x}{2 \, b}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \sqrt {- c \left (- a + b x\right )} \sqrt {a + b x}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 148 vs.
\(2 (56) = 112\).
time = 1.06, size = 148, normalized size = 2.18 \begin {gather*} \frac {\frac {2 \, a^{2} c \log \left ({\left | -\sqrt {b x + a} \sqrt {-c} + \sqrt {-{\left (b x + a\right )} c + 2 \, a c} \right |}\right )}{\sqrt {-c}} + \sqrt {-{\left (b x + a\right )} c + 2 \, a c} \sqrt {b x + a} {\left (b x - 2 \, a\right )} - 2 \, {\left (\frac {2 \, a c \log \left ({\left | -\sqrt {b x + a} \sqrt {-c} + \sqrt {-{\left (b x + a\right )} c + 2 \, a c} \right |}\right )}{\sqrt {-c}} - \sqrt {-{\left (b x + a\right )} c + 2 \, a c} \sqrt {b x + a}\right )} a}{2 \, b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.20, size = 72, normalized size = 1.06 \begin {gather*} \frac {x\,\sqrt {a\,c-b\,c\,x}\,\sqrt {a+b\,x}}{2}-\frac {a^2\,\sqrt {b}\,c^2\,\ln \left (\sqrt {-b\,c}\,\sqrt {c\,\left (a-b\,x\right )}\,\sqrt {a+b\,x}-b^{3/2}\,c\,x\right )}{2\,{\left (-b\,c\right )}^{3/2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________